	var vue = new Vue({
		el: "#main",
		data() {
			return {
				detail: {},
				id: '',
				isShowModal: false,
				flvPlayer: null,
				isLoading: true,
				images: [],
				remark_record: [],
				isManual: false, //点击点位详情显示的场所位置
				map: null, //地图实例
			}
		},
		mounted() {
			this.id = getRequest().id
			this.getDetail()
		},
		methods: {
			// 选择手机地图app跳转到当前位置
			goMap() {
				wx.openLocation({
					latitude: parseFloat(this.detail.latitude), // 纬度，浮点数，范围为90 ~ -90
					longitude: parseFloat(this.detail.longitude), // 经度，浮点数，范围为180 ~ -180。
					name: this.detail.place_name, // 位置名
					address: this.detail.address, // 地址详情说明
					scale: 28, // 地图缩放级别,整型值,范围从1~28。默认为最大
					infoUrl: '', // 在查看位置界面底部显示的超链接,可点击跳转
					marker: null, //
				});
			},
			// 清除监控
			closeVodeo() {
				this.isShowModal = false
				this.flvPlayer.destroy()
			},
			// 监控展示
			showVideo() {
				this.isShowModal = true
				$('.ub-isLoading').show()
				// this.isLoading = true
				var video = document.getElementById('my-player');
				if (flvjs.isSupported()) {
					this.flvPlayer = flvjs.createPlayer({
						type: 'flv',
						url: this.detail.video
					});
					this.flvPlayer.attachMediaElement(video);
					this.flvPlayer.load();
					this.flvPlayer.play();
				} else {
					alert("ios暂不支持此格式视频播放")
					this.isShowModal = false
				}
				setTimeout(() => {
					document.getElementById('my-player').onplay = function () {
						$('.ub-isLoading').hide()
					};
				}, 300)
			},
			// 查看图片
			lookImg(list) {
				wx.previewImage({
					// current: 'http://admin.tangshan.youbo.me/upload/place/202211/7WBay02UiZx9mszwLJcjoEgrX5GYhPTV.jpg', // 当前显示图片的 http 链接
					urls: list // 需要预览的图片 http 链接列表
				});
			},
			// 获取场所信息
			getDetail() {
				ajax({
					url: formal + '/place/place-info',
					type: 'GET',
					data: {
						id: this.id
					},
					success: (res) => {
						this.detail = res.data
						this.remark_record = res.data.remark_record
						this.images = res.data.images
					},
				})
			},
			showAddresss() {
				console.log(this.detail.longitude, this.detail.latitude);
				console.log(this.detail.cate_icon);
				this.isManual = true
				setTimeout(() => {
					if (!this.map) {
						this.map = new T.Map("containerma");
					}
					//设置显示地图的中心点和级别
					if (this.marker) {
						this.map.removeOverLay(this.marker)
					}
					this.map.centerAndZoom(new T.LngLat(this.detail.longitude, this.detail.latitude),
						18);
					this.map.setMinZoom(11);
					this.map.setMaxZoom(18);
					var point = new T.LngLat(this.detail.longitude, this.detail.latitude);
					var icon = new T.Icon({
						iconUrl: this.detail.cate_icon,
						iconSize: new T.Point(20, 20),
						iconAnchor: new T.Point(10, 25)
					});
					this.marker = new T.Marker(point, {
						icon: icon,
					});
					this.marker = new T.Marker(point);
					this.map.addOverLay(this.marker)
				}, 100)
			},
			// 检查
			goInspectionDetails(id, num) {
				location.href = "./inspectionDetails.html?id=" + id + '&type=1';
				sessionStorage.setItem('numx', num);
			}
		}
	})